import axios from '../../axios'

export default {
    register(newLessors) {
        return axios({
            url: '/lessors/register',
            method: 'post',
            data: newLessors
        })
    },
    checkUsername(username) {
        return axios({
            url: '/lessors/checkUsername',
            method: "post",
            data: username
        })
    },
    login(lessors) {
        // console.log(lessors);
        return axios({
            url: '/lessors/login',
            method: 'post',
            data: lessors
        })
    },
    isLogin(token) {
        return axios({
            url: '/lessors/isLogin',
            method: "get",
            params: token
        })
    },
    //审核出租渲染列表
    getLessors(params) {
        return axios({
            url: '/lessors/getLessors',
            methods: "get",
            params
        })
    },

    getState(params) {
        return axios({
            url: 'lessors/getState',
            methods: 'get',
            params
        })
    },
    //出租方查看个人订单
    getLessorsOrders(data){
        return axios({
            url:"/lessors/getLessorsOrders",
            method:"post",
            data
        })
    }

}